package com.core.reach.rule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ga.zhang
 * @version V1.0
 * @description: 自定义负载均衡规则不能放在ComponentScan能扫描到的包内
 * @date 2020/3/25 14:31
 **/
@Configuration
public class CustomRule {

    @Bean
    public IRule mySelfRule(){
        //随机
        return new RandomRule();
    }

}
